package com.lix.service.workflow;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lix.base.BaseResult;
import com.lix.enums.BusinessStatusEnum;
import com.lix.pojo.model.BusinessStatus;

public interface IBusinessStatusService extends IService<BusinessStatus> {

    /**
     * 新增数据，状态：待处理
     *
     * @param businessKey 业务id
     * @return
     */
    int add(String businessKey);

    /**
     * 根据业务id更新业务状态和流程实例id
     *
     * @param businessKey 业务id
     * @param stateEnum   业务状态
     * @param procInstId  流程实例id
     */
    BaseResult updateState(String businessKey, BusinessStatusEnum stateEnum, String procInstId);

    /**
     * 根据业务id更新业务状态
     *
     * @param businessKey 业务id
     * @param stateEnum   业务状态
     */
    BaseResult updateState(String businessKey, BusinessStatusEnum stateEnum);
}